﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Aras.IOM;

namespace ArasConnection
{
    public static  class PublicState
    {
        public static string PLMUrl { get; set; }
        public static string PLMDatabase { get; set; }
        public static string PLMUserName { get; set; }
        public static string PLMPassword { get; set; }
        public static HttpServerConnection ArasConnection
        {
            get
            {
                if (!String.IsNullOrEmpty(PLMUrl))
                {
                    if (!String.IsNullOrEmpty(PLMDatabase))
                    {
                        return IomFactory.CreateHttpServerConnection(PLMUrl, PLMDatabase, PLMUserName, PLMPassword);
                    }
                    else
                    {
                        return IomFactory.CreateHttpServerConnection(PLMUrl);
                    }
                }
                else
                    return null;
            }
        }
        public static Innovator ArasLoginInnovator { get; set; }
        public static Item ArasLoginItem { get; set; }
        public static List<Common.CRelationShip> RelationShipList =new List<Common.CRelationShip>();
    }
}
